#include "lerp_n_d.h"

using namespace Lerp;

extern "C" __global__ __aicore__ void lerp(GM_ADDR start, GM_ADDR end, GM_ADDR weight, GM_ADDR y, GM_ADDR workspace,
                                           GM_ADDR tiling) {
    GET_TILING_DATA(tilingData, tiling);
    if (TILING_KEY_IS(101)) {
        LerpND<float> op;
        op.Init(start, end, weight, y, &tilingData);
        op.Process();
    } else if (TILING_KEY_IS(201)) {
        LerpND<half> op;
        op.Init(start, end, weight, y, &tilingData);
        op.Process();
    }
}